package com.vegetable.modules.entity.stock.to;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库存表
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-21
 */
@Data
@TableName("stock_cost_change")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Stock成本变化对象", description="Stock成本变化对象")
public class StockCostChangeDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("库存id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long stockId;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品编码")
    private String commonCode;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "规格ID")
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "商品标签(0原料，1半成品，2成品，3材料)")
    private Integer tag;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "单据编号")
    private String storageOrderNo;

    @ApiModelProperty(value = "仓库id")
    private Long warehouseId;

    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(value = "库存批次编码")
    private String stockBatchNo;

    @ApiModelProperty(value = "商品来源")
    private String agentName;

    @ApiModelProperty(value = "原成本")
    private BigDecimal beforeCost;

    @TableField(exist = false)
    @ApiModelProperty(value = "原成本详情")
    private List<Map<String, String>> beforeCostDetailList;

    @ApiModelProperty(value = "现在成本")
    private BigDecimal nowCost;

    @TableField(exist = false)
    @ApiModelProperty(value = "变化成本详情")
    private List<Map<String, String>> changeCostDetailList;

    @ApiModelProperty(value = "现在成本详情")
    private String nowCostDetail;

    @ApiModelProperty(value = "数量")
    private Integer number;


    @ApiModelProperty(value = "重量")
    private BigDecimal weight;
}
